<html>
	<head>
		<title>定时器</title>
		<meta charset="utf-8">
		<script>
			window.onload = init;
			var i = 1;
			var picPath = "image/day12/dd_scroll_";
			var picArr = ['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg'];
			function init() {
				// body...
				window.setInterval("start1()", 3000);

			}
			function start1() {
				var pic = document.getElementById('pic');
				pic.src =picPath + picArr[i];
				i++;
				if (i>5) {
					i = 0;
				}

			
			}
		</script>
	</head>
	<body>
		<div>
			<img id="pic" src="image/day12/dd_scroll_1.jpg">
			
		</div>
		
	</body>
</html>